<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/7/30
 * Time: 10:19
 */

namespace app\admin\model;


use think\Model;

class Goods extends Model
{
    //protected $json=["cover","banner"];
    public function getBannerAttr($value){
        if($value){
            $bannerArr=explode(",",$value);
            return $bannerArr;
        }

    }

    public function category(){
        return self::belongsTo("Category","store_type","id");
    }

    public function user(){
        return self::belongsTo("User","store_id","uid");
    }

}